Skip to content

feat: XOAUTH2 hooks for OIDC authentication#65

Open
jcdelepine wants to merge 1 commit into
horde:FRAMEWORK_6_0from
jcdelepine:feat/OidcIntegration
Open

feat: XOAUTH2 hooks for OIDC authentication#65
jcdelepine wants to merge 1 commit into
horde:FRAMEWORK_6_0from
jcdelepine:feat/OidcIntegration

Conversation

@jcdelepine

Copy link
Copy Markdown
Contributor

Adds OIDC/XOAUTH2 hook examples to hooks.php.dist:

  • imap_preauthenticate: injects a Horde_Imap_Client_Password_Xoauth2 object when the user has OAuth2 tokens stored, falling back to password auth otherwise.

  • dynamic_prefs: proactively refreshes OAuth2 tokens before they expire during a session, and updates the IMAP password stored in the Horde session so active connections use the new token.

Also relaxes the credential check in IMP_Auth to accept either a password or a xoauth2_token, allowing OIDC sessions to authenticate without a stored password.

All hook code is commented out in the .dist file and must be explicitly activated by the administrator.

Depends on:

  • horde/Core: OIDC integration (PR #160)

Adds OIDC/XOAUTH2 hook examples to hooks.php.dist:

- imap_preauthenticate: injects a Horde_Imap_Client_Password_Xoauth2
  object when the user has OAuth2 tokens stored, falling back to
  password auth otherwise.

- dynamic_prefs: proactively refreshes OAuth2 tokens before they
  expire during a session, and updates the IMAP password stored in
  the Horde session so active connections use the new token.

Also relaxes the credential check in IMP_Auth to accept either a
password or a xoauth2_token, allowing OIDC sessions to authenticate
without a stored password.

All hook code is commented out in the .dist file and must be explicitly
activated by the administrator.

Depends on:
- horde/Core: OIDC integration (PR #160)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant